<div class="box">
	<div class="m">
		<h2>上傳結果列表</h2>
		<div id="response_box">
		<!-- 顯示上傳成功圖片列表 -->
		<?php if(!empty($upload_data)):?>
		<form action="<?php echo site_url('admin/galleries/save_upload_info');?>" id="upload_info" method="post">
		<div class="p5">
			<div class="list_1" style="height: 20px;padding-right:50px;">
				<div style="float:right;"><input type="submit" name="info_submit" value="保存資料"/></div>
			</div>	
		<?php foreach($upload_data as $file) :?>
			<div class="list_1">
				<div style="float:left;width:110px;">
					<span><a href="<?php echo site_url();?>">
					<img style="border:0px;" src="<?php echo $file['path']?>.small.jpg" width="90"/></a></span>
				</div>
				<div style="float:left;width:70%;">
					<p><span style="vertical-align:top">標題:</span><input style="width:80%;" type="text" value="<?php echo $file['name'];?>" name="gallery_<?php echo $file['id']?>[]"/>
					<br />
					<br />
					<span style="vertical-align:top">描述:</span><textarea style="width:80%;" name="gallery_<?php echo $file['id']?>[]" cols="17" rows="2"><?php echo $file['name'];?></textarea>
					</p>
				</div>
				<div class="cle"></div>
			</div>
			<?php endforeach;?>
			<div class="list_1" style="height: 20px;padding-right:50px;">
				<div style="float:right;"><input type="submit" name="info_submit" value="保存資料"/></div>
			</div>	
		</div>
		</form>
		<?php endif;?>
		</div>
	<!-- /顯示上傳成功圖片列表 -->
	
	<!-- 顯示上傳出錯信息 -->
	<?php if(!empty($errors)) :?>
	<div id="upload-error">
		<ul>
		<?php foreach($errors as $error) :?>
		    <li>
		        <?php echo $error;?>
		    </li>
		<?php endforeach;?> 
		</ul>
		<div class="clearfix"></div>
	</div>
	<div class="clearfix"></div>
	<?php endif;?>
	<!-- /顯示上傳出錯信息 -->
	</div>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
	function showRequestInfo(formData, jqForm, options) 
	{ 
		$(document).ajaxStop($.unblockUI);
		$.blockUI({ message: '<br /><h2><img src="<?php echo image_url('admin/upload/ajax-loader.gif'); ?>" /> 正在上傳圖片,請稍候...</h2><br />' }); 
	} 
	function showResponseInfo(responseText, statusText, xhr, $form)  
	{
		$("#upload_result_list").toanchor({anchortag: "href",anchorSmooth: false});
		$("#upload_result_list").click();
	} 
	var option_info = { 
        target:         '#response_box',
        beforeSubmit:   showRequestInfo,
        success:        showResponseInfo,
        clearForm: 		true,
        resetForm: 		false,
        timeout:   		30000 
    };
//-->
</SCRIPT>